package com.hbter630.change.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hbter630.change.entity.Order_;
import com.hbter630.change.mapper.OrderMapper;
import com.hbter630.change.service.OrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hbter630.change.utils.Result;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xbfinal
 * @since 2023-05-24
 */
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order_> implements OrderService {

    @Override
    public Result getOrderByPage(long current, long limit) {

        //页码  条数
        Page<Order_> userPage = new Page<>(current, limit);
        Page<Order_> userPage1 = baseMapper.selectPage(userPage, null);

        return Result.ok().addData(userPage1);
    }
}
